/* babl - dynamically extendable universal pixel conversion library.
- * Copyright (C) 2005, Øyvind Kolås.
+ * Copyright (C) 2012, Øyvind Kolås.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
/* should return the BablModel, permitting to fetch
* other formats out of it?
*/
-void babl_new_palette (const char *name, const Babl **format_u8,
- const Babl **format_u8_with_alpha)
+const Babl *babl_new_palette (const char *name,
+ const Babl **format_u8,
+ const Babl **format_u8_with_alpha)
{
const Babl *model;
const Babl *model_no_alpha;
if (format_u8_with_alpha)
*format_u8_with_alpha = f_pal_a_u8;
babl_sanity ();
+ return model;
}
void
const Babl * babl_conversion_new (const void *first_arg,
...) BABL_ARG_NULL_TERMINATED;
+
/**
* create a new palette based format, name is optional pass in NULL to get
* an anonymous format. If you pass in with_alpha the format also gets
- * an 8bit alpha channel.
+ * an 8bit alpha channel. Returns the BablModel of the color model.
*/
-void babl_new_palette (const char *name, const Babl **format_u8,
- const Babl **format_u8_with_alpha);
+const Babl *babl_new_palette (const char *name,
+ const Babl **format_u8,
+ const Babl **format_u8_with_alpha);
/**
* Assign a palette to a palette format, the data is a single span of pixels